﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Routing.aspx.cs" Inherits="TicketM.Configuration.Routing" MasterPageFile="./ConfigSite.Master" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>Ticketing Application Configuration Manager</h1>
            </hgroup>
              <nav>
                    <ul id="lmenu">
                        <li><a id="A1" runat="server" href="Configuration.aspx">Servers and Accounts</a></li>
                        <li><a id="A2" runat="server" href="#"><span style="color: darkslategray">Conditional Assignment</span></a></li>
                        <li><a id="A3" runat="server" href="Products.aspx">Products List</a></li>
                        <li><a id="A4" runat="server" href="Escalation.aspx">Escalation</a></li>
                    </ul>
                </nav>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <table>
        <tr style="height:50px">
            <td style="border-right:solid;border-right-color:darkgrey;border-bottom:solid;border-bottom-color:darkgrey">
                <asp:Label runat="server" ID="lblProject" Text="" />
                <asp:Label runat="server" ID="AreaPath" Width="400px" ReadOnly="true" Text="Area Path" Font-Size="Large" />
            </td>
            <td  style="padding-left:20px;border-right:solid;border-right-color:darkgrey;border-bottom:solid;border-bottom-color:darkgrey">
                <asp:Label runat="server" ID="lblPrmpt" Text="Select Defualt Team / Team Member" Font-Size="Large" />
                            </td>
            <td>
                <asp:Button ID="StoreButton" OnClick="StoreButton_Click" runat="server" Text="Store to local file" Enabled="False" Width="200px" />
            </td>
        </tr>
        <tr>
            <td style="vertical-align:top;border-right:solid;border-right-color:darkgrey">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="RoutingObjectDS" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" />
                        <asp:BoundField DataField="AreaPath" HeaderText="Area Path" />
                        <asp:BoundField DataField="AssignedTo" HeaderText="Assigned To" />
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="RoutingObjectDS" runat="server" SelectMethod="ReadRoutingFromTFS" TypeName="TicketM.Models.Tickets">
                    <SelectParameters>
                        <asp:SessionParameter Name="sProject" SessionField="sProject" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:XmlDataSource ID="RoutingDataSource" runat="server" DataFile="~/App_Data/AreasStruct.xml"></asp:XmlDataSource>

            </td>
            <td style="vertical-align: top;padding-left:20px;border-right:solid;border-right-color:darkgrey; padding-top:10px">

                
                <asp:DropDownList ID="AssignedTo" runat="server" DataSourceID="TeamDataSource">
                    
                </asp:DropDownList>
            </td>
            <td style="vertical-align:top">
                <asp:Button ID="UpdateButton" Text="Update all changes to TFS" runat="server" OnClick="UpdateButton_Click" Enabled="False"  Width="200px" />
            </td>
        </tr>
    </table>

    <asp:XmlDataSource ID="XmlDataSource2" runat="server" DataFile="~/App_Data/AreasStruct.xml"></asp:XmlDataSource>
                <asp:ObjectDataSource ID="TeamDataSource" runat="server" SelectMethod="GetTeamMembers" TypeName="TicketM.Models.Tickets">
                    <SelectParameters>
                        <asp:SessionParameter Name="sProject" SessionField="sProject" Type="String" />
                    </SelectParameters>
    </asp:ObjectDataSource>

    <asp:XmlDataSource ID="XmlDataSource1" runat="server"></asp:XmlDataSource>

</asp:Content>
